﻿using Raffles.OA.Data.Entity.Sale;
using SqlSugar;
using System;
using System.Collections.Generic;

namespace Raffles.OA.Data
{
    /// <summary>
    /// 日 期：2024/7/30 15:44:33
    /// 描 述：项目报价项实体类
    /// </summary>
    [SugarTable("ProjectQuotationItem")]
    public partial class ProjectQuotationItemEntity : BaseEntity
    {
        /// <summary>
        /// 项目Id
        /// </summary>
        public int? ProjectId { get; set; }
        /// <summary>
        /// 团组分段
        /// </summary>
        public int? SegmentId { get; set; }
        /// <summary>
        /// 项类型
        /// </summary>
        public string QuotationItemCode { get; set; }
        /// <summary>
        /// 项明细
        /// </summary>
        public int? ItemId { get; set; }
        /// <summary>
        /// 项明细
        /// </summary>
        public string ItemName { get; set; }
        /// <summary>
        /// 销售单价
        /// </summary>
        public decimal? SalePrice { get; set; }
        /// <summary>
        /// 成本单价
        /// </summary>
        public decimal? Price { get; set; }
        /// <summary>
        /// 数量/天数/晚数
        /// </summary>
        public int? Quantity { get; set; }
        /// <summary>
        /// 人数/房数
        /// </summary>
        public int? Number { get; set; }
        /// <summary>
        /// 销售总价
        /// </summary>
        public decimal? SaleTotal { get; set; }
        /// <summary>
        /// 成本总价
        /// </summary>
        public decimal? Total { get; set; }
        /// <summary>
        /// 备注说明
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 源数据Id(报价主单)
        /// </summary>
        public int? SourceId { get; set; }
    }

    public partial class ProjectQuotationItemEntity
    {
        [Navigate(NavigateType.OneToMany, nameof(ProjectQuotationItemDetailEntity.QuotationItemId))]
        public List<ProjectQuotationItemDetailEntity> ItemDetail { get; set; }

        /// <summary>
        /// 交通导游
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(ProjectQuotationTransportDetailEntity.QuotationItemId))]
        public List<ProjectQuotationTransportDetailEntity> TransportDetail { get; set; }

        /// <summary>
        /// 团组培训
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(ProjectQuotationTransportDetailEntity.QuotationItemId))]
        public List<ProjectQuotationActivityDetailEntity> ActivityDetail { get; set; }
    }
}
